package controllers

import (
	beego "github.com/beego/beego/v2/server/web"
	"gorm.io/gorm"
	"new02/models"
)

type NewController struct {
	beego.Controller
}
type JsonR struct {
	Cod  int         `json:"cod"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

func (c *NewController) Add() {
	title := c.GetString("title")
	time := c.GetString("time")
	fl := c.GetString("fl")
	allnew := models.New{
		Title: title,
		Time:  time,
		Fl:    fl,
	}
	err:=models.
}
func (c *NewController) List() {

}
func (c *NewController) Up() {

}
func (c *NewController) Del() {
id,_:=c.GetInt("id")
}
